Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: remove dead label code in bgp_update #15305

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

louis-6wind
Copy link
Contributor

No need to init new_attr. It is not used until it is overridden.

new_attr = *attr;

@frrbot frrbot bot added the bgp label Feb 5, 2024
@ton31337 ton31337 added this to the 10.0 milestone Feb 5, 2024
@@ -4218,10 +4218,6 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
if (orig_safi == SAFI_LABELED_UNICAST)
safi = SAFI_UNICAST;

memset(&new_attr, 0, sizeof(new_attr));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should initialize at least it at the declaration struct attr new_attr = {};, to avoid some tricky edge cases? (don't know if coverity does not complain too)

Copy link
Contributor Author

@louis-6wind louis-6wind Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

No need to init new_attr. It is not used until it is overridden.

> new_attr = *attr;

Signed-off-by: Louis Scalbert <[email protected]>
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good -- should this be a bugfix, or wait until after the freeze?

@donaldsharp donaldsharp merged commit 1bc2fa3 into FRRouting:master Feb 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants